import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.Stack;
import java.util.TreeSet;


public class FactoryColecoes{
	
	private static FactoryColecoes instancia = new FactoryColecoes();
	
	private FactoryColecoes(){
		
	}
	

	public static FactoryColecoes getInstance(){
		return instancia;
	}
	
	public Colecoes getColecoes(OpcoesLista opLista, OpcoesSet opSet){
		Colecoes c = new Colecoes();
		
		if (opLista.equals(OpcoesLista.LINKED_LIST)){
			c.lista = new LinkedList<String>();
		}
		else if(opLista.equals(OpcoesLista.STACK)){
			c.lista = new Stack<String>();
		}
		
		
		if (opSet.equals( OpcoesSet.HASH_SET )){
			c.listaUnica = new HashSet<String>();
		}else if (opSet.equals( OpcoesSet.LINKED_HASH_SET )){
			c.listaUnica = new LinkedHashSet<String>();
		}else if (opSet.equals( OpcoesSet.TREE_SET )){
			c.listaUnica = new TreeSet<String>();
		}

		
		return c;
	}
	
	
}
